Developer Documentation

QuickTime 4 API Documentation

Wired Movies and Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Operator Type Constants

You set the ID of a kOperatorAtomType atom to one of the following constants to associate it with a particular operator type. Boolean operations are applied to two operands at a time. If the operand list contains more than two operands, the operation is performed upon the first two and the result is saved. The operation is then repeatedly applied to the current result and the next operand, continuing until no more operands are left. Unary opererations are applied to only one operand.

Operands are converted to single-precision, floating-point numbers before the operation is performed.

For the Boolean operations, non-zero operands are considered to be true , and operands equal to 0 are considered to be false .

The actual numeric result of the Boolean and conditional operations is 1 for true and 0 for false .

Constant descriptions

kOperatorAdd
This binary operator adds its two operands together producing a numeric result.

kOperatorSubtract
This binary operator subtracts its second operand from its first producing a numeric result.

kOperatorMultiply
This binary operator multiplies its two operands together producing a numeric result.

kOperatorDivide
This binary operator divides its first operand by its second producing a numeric result. If the second operand is 0, a result of 0 is returned.

kOperatorOr
This Boolean binary operator performs a Boolean OR operation. If either of the two operands are true, then the result is true , otherwise the result is false .

kOperatorAnd
This Boolean binary operator performs a Boolean AND operation. If both of the two operands are true, then the result is true, otherwise the result is false

kOperatorNot
This Boolean unary operator performs a Boolean NOT operation on its single operand. If its operand is true, the result is false , otherwise the result is true .

kOperatorLessThan
This comparison binary operator compares its first operand to its second. If the first is less than the second, the result is true , otherwise the result is false .

kOperatorLessThanEqualTo
This comparison binary operator compares its first operand to its second. If the first is less than or equal to the second, the result is true , otherwise the result is false .

kOperatorEqualTo
This comparison binary operator compares its first operand to its second. If the first is equal to the second, the result is true , otherwise the result is false .

kOperatorNotEqualTo
This comparison binary operator compares its first operand to its second. If the first is not equal to the second, the result is true , otherwise the result is false .

kOperatorGreaterThan
This comparison binary operator compares its first operand to its second. If the first is greater than the second, the result is true , otherwise the result is false .

kOperatorGreaterThanEqualTo
This comparison binary operator compares its first operand to its second. If the first is greater than or equal to the second, the result is true , otherwise the result is false .

kOperatorModulo
This binary operator divides its first operand by its second. The remainder is returned as a numeric result. If the second operand is 0, a result of 0 is returned.

kOperatorIntegerDivide
This binary operator divides its first operand by its second. The remainder is truncated and the root is returned as a numeric result. If the second operand is 0, a result of 0 is returned.

kOperatorAbsoluteValue
This unary operator returns its single operand as a positive numeric number. Positive operands are simply returned; negative operands are multiplied by negative 1 to be made positive, and returned.

kOperatorNegate
This unary operator multiplies its single operand by negative 1, producing a numeric result.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |